package com.lottery.service.pc28.wealthService.impl;


import com.alibaba.fastjson.JSON;
import com.lottery.service.pc28.wealthService.impl.config.AliPayConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;


/**
 * 支付宝交易类
 */
public class AlipayTrade {

    private Logger logger = LoggerFactory.getLogger(AlipayTrade.class);
    
    /**
     * App支付下单
     * url https://doc.open.alipay.com/doc2/detail.htm?treeId=203&articleId=105463&docType=1#s1
     * @return web支付的表单
     */
//    public String TradeAppPayRequest(Map<String, String> sParaTemp){
//    	AlipayTradeAppPayRequest alipayRequest = new AlipayTradeAppPayRequest();
//        alipayRequest.setNotifyUrl(AliPayConfig.PAY_NOTIFY);//异步通知地址url
//        alipayRequest.setBizContent(JSON.toJSONString(sParaTemp));
//        String form = "";
//        try {
//            form = AliPayConfig.getInstance().sdkExecute(alipayRequest).getBody();//这里和普通的接口调用不同，使用的是sdkExecute
//        } catch (AlipayApiException e) {
//            logger.error("支付宝构造表单失败",e);
//        }
//        logger.debug("支付宝支付表单构造:"+form);
//        return form;
//    }


    
}
